/**
***********************************************************************
*
* Copyright 2011 Stefan Wöhle
*
* This file is part of PixelMath
*
* PixelMath is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PixelMath is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with PixelMath. If not, see <http://www.gnu.org/licenses/>.
*
***********************************************************************
*/

#ifndef PIXELMATHWINDOW_H
#define PIXELMATHWINDOW_H

#include <QMainWindow>
#include <QImage>

namespace Ui {
    class PixelMathWindow;
}
class QLabel;

/**********************************************************
 *
 *  PixelMathWindow
 *
 *  This class is the center of the application.
 *  It shows a preview of the images and allows
 *  to create further FormulaEditors.
 *  The original images is always shown on the
 *  left and scaled if it is too large. The last
 *  applied modification is shown at the right.
 *
 **********************************************************/

class PixelMathWindow : public QMainWindow
{
    Q_OBJECT
public:
protected:
private:
    Ui::PixelMathWindow *ui;
    QImage _originalImage;
    QImage _modifiedImage;

public:
    explicit PixelMathWindow(QWidget *parent = 0);
    ~PixelMathWindow();
    const QImage& originalImage();
    void setModifiedImage(QImage& modifiedImage);
protected:
private:
    void showPreviewOnLabel(QLabel* target, QImage& image);

public slots:
protected slots:
private slots:
    void on_actionOpen_triggered();
    void on_actionClose_triggered();
    void on_actionNew_formula_triggered();

    void on_actionSave_triggered();

signals:
};

#endif // PIXELMATHWINDOW_H
